import request from '@/utils/request'

// 巡检事项记录
export function getList(data) {
    return request({
        url: '/web-api/patrol/patrolTask/list',
        method: 'get',
        params: data,
    })
}

export function getList1(data) {
    return request({
        url: '/web-api/patrol/patrolTask/list',
        method: 'get',
        params: data,
    })
}

// 发布任务
export function releaseTask(ids) {
    return request({
        url: `/web-api/patrol/patrolTask/release/${ids}`,
        method: 'get',
    })
}

// 添加巡检事项
export function addPatrolPlan(data) {
    return request({
        url: '/web-api/patrol/task/plan',
        method: 'post',
        data,
    })
}

// 巡检事项详情
export function getOne(id) {
    return request({
        url: '/web-api/patrol/task/plan/' + id,
        method: 'get'
    })
}

// 巡检任务记录详情
export function getTwo(id) {
    return request({
        url: '/web-api/patrol/patrolTask/' + id,
        method: 'get'
    })
}

// 巡检任务记录详情
export function getReportList(data) {
    return request({
        url: '/web-api/patrol/patrolTask/report/list',
        method: 'get',
        params: data,
    })
}

// 根据巡查记录id查询事项
export function listManPatrolItem(situationId) {
    return request({
        url: '/web-api/supervise/patrol/listManPatrolItem/' + situationId,
        method: 'get'
    })
}

